﻿<!DOCTYPE
    html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title></title>
    <link href="css/style.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="js/jquery-1.4.4.min.js" ></script>
    <script type="text/javascript" src="js/Rajon.js"></script>
    
    <script language="javascript">

        function signin() {
            var user = document.getElementById('user').value;
            if (user == '')
                return;            
            var vmodel = new RajonViewModel(user);
            vmodel.addToModelSource({ datacontext: 'OrderService/SignedUsers',
                onModelAdded: function () {
                    var view = document.getElementById('currentSignedUser');
                    view.vmodel.bind();
                } 
            });

            

        }
    </script>
                
</head>
<body>
    

    <div id="currentSignedUser" rajon:datacontext="OrderService/MyUser" rajon:restCache="off" >
        Current Signed User: <span rajon:bind="model"></span><br />                
    </div>

    <a href="Session_Required.htm">try other page</a>
    
    <div>
        <input type="button" value="Sign in as" onclick="signin()"/> <input id="user" type="text" class="EditIsOn" />        
    </div>

</body>

</html>
